package com.regent.central.bill.service.bean;

import com.regent.central.bill.core.CreateGoodsRemark;
import com.regent.central.bill.repository.CreateGoodsRemarkMapper;
import com.regent.central.bill.service.CreateGoodsRemarkService;
import com.regent.central.infrastructure.service.bean.DomainServiceBean;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CreateGoodsRemarkServiceBean extends DomainServiceBean<CreateGoodsRemarkMapper, CreateGoodsRemark> implements CreateGoodsRemarkService {
    /**
     * 伪删除开单要货备注
     *
     * @param createGoodsRemarkId 开单要货备注ID
     * @param userDeleted         删除人
     */
    @Override
    public void hide(String createGoodsRemarkId, String userDeleted) {
        mapper.hide(createGoodsRemarkId, userDeleted, System.currentTimeMillis());
    }

    /**
     * 获取开单货品备注列表
     *
     * @param createGoodsId 开单货品ID
     * @return 开单货品备注列表
     */
    @Override
    public List<CreateGoodsRemark> getCreateGoodsRemarks(String createGoodsId) {
        return mapper.getCreateGoodsRemarks(createGoodsId);
    }
}